package com.ltedu.oss.storage;

import com.ltedu.common.exception.BaseException;
import org.springframework.web.multipart.MultipartFile;

/**
 * @className: Storage
 * @auther: Jerry
 * @date: 2020/11/26 10:43
 * @desctiption: TODO
 * @version: 1.0
 */
public interface Storage {
    /**
     * 存储图片
     * @param file
     * @return
     * @throws BaseException
     */
    String store(MultipartFile file) throws Exception;

    /**
     * 删除文件
     * @param storePath
     */
    void deleteFile(String storePath);

    String writeToStore(byte[] bytes, String pathAndFileName) throws Exception;
}
